class ServiceManager {
	public constructor() {

	}

	private serviceList = {};
	public register(serviceType: string, serviceInstance: IService): void {
		this.serviceList[serviceType] = serviceInstance;
	}

	public unregister(serviceType: string): void {
		if (serviceType in this.serviceList[serviceType]) {
			delete this.serviceList[serviceType];
		}
	}

	public init(): void {
		for (let service in this.serviceList) {
			let serviceInstance = this.serviceList[service] as IService;
			serviceInstance.init();
		}
	}
}